package cn.iocoder.yudao.module.vos.dal.mysql.gatewaylevel;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.vos.dal.dataobject.gatewaylevel.GatewayLevelDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.vos.controller.admin.gatewaylevel.vo.*;

/**
 * 网关等级 Mapper
 *
 * @author shijun
 */
@Mapper
public interface GatewayLevelMapper extends BaseMapperX<GatewayLevelDO> {

    default PageResult<GatewayLevelDO> selectPage(GatewayLevelPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<GatewayLevelDO>()
                .likeIfPresent(GatewayLevelDO::getGatewayName, reqVO.getGatewayName())
                .likeIfPresent(GatewayLevelDO::getGatewayShortName, reqVO.getGatewayShortName())
                .eqIfPresent(GatewayLevelDO::getListLevel, reqVO.getListLevel())
                .orderByDesc(GatewayLevelDO::getId));
    }

}